<%= stylesheet_link_tag "layouts/sys_nav" %>
<script>
    $(function() {
        $("#<%= params[:controller] == "webs" ? params[:action] : params[:controller] %>").addClass("selected");
    });

</script>

<div class="sys-nav">
  <ul>
    <li><a href="/" id="index"><%= t 'activerecord.attributes.layout.home' %></a></li>
    <% if current_user %>
        <% if current_user.admin? %>
            <li><a id="" class="inline-block nav-item" href="/shipowners">
              基础数据维护
            </a></li>
             <li><a id="shipper_maps" href="/shipper_maps"><%= t 'activerecord.attributes.layout.my_bl' %></a></li>
        <% elsif current_user.shipper? %>
            <li><a id="shipper_maps" href="/shipper_maps"><%= t 'activerecord.attributes.layout.my_bl' %></a></li>
        <% elsif current_user.cy? %>
            <li><a id="cy_maps" href="/cy_maps"><%= t 'activerecord.attributes.layout.my_bl' %></a></li>
        <% elsif current_user.forward? %>
            <li><a id="forward_maps" href="/forward_maps"><%= t 'activerecord.attributes.layout.my_bl' %></a></li>
        <% elsif current_user.shipowner? %>
            <li><a id="shipowner_maps" href="/shipowner_maps"><%= t 'activerecord.attributes.layout.my_bl' %></a>
            </li>
            <li><a id="forwards" class="inline-block nav-item" href="/forwards">
              <%= t 'activerecord.attributes.layout.forward_manage' %>
            </a></li>
        <% elsif current_user.motorcade? %>
            <li>
              <a id="motorcade_maps" href="/motorcade_maps/index"><%= t 'activerecord.attributes.layout.vehicle_manage' %></a>
            </li>
        <% end %>
        <% if current_user.biz_unit_admin? || current_user.admin? %>
            <li><a id="users" class="inline-block nav-item" href="/users">
              用户管理
            </a></li>
        <% end %>
    <% else %>
        <li><a id="shipper_maps" href="/shipper_maps"> 提单查询 </a></li>
    <% end %>
    <li>
      <a id="products" href="/webs/products" id="myBills">产品</a>
    </li>
    <li>
      <a href="/webs/help" id="help">帮助</a>
    </li>
    <li>
      <a href="/webs/contact_us" id="contact_us">联系我们</a>
    </li>

  </ul>
</div>